import Cookies from 'js-cookie'

const TokenKey = 'loginToken'

export function getUid() {
  const cookie = Cookies.get('uid')
   console.log(cookie,'cookie')
  return Cookies.get('uid')
}
export function getToken() {
  const cookie = Cookies.get('loginToken')
   console.log(cookie,'cookie')
  return Cookies.get(TokenKey)
}

export function setUid(token) {
  return Cookies.set('uid', token,{ expires: 1 })
}
export function setToken(token) {
  return Cookies.set(TokenKey, token,{ expires: 1 })
}
export function setAdminId(adminId) {
  return Cookies.set('adminId', adminId)
}
export function getAdminId() {
 
  return Cookies.get('adminId')
}
export function removeToken() {
  return Cookies.remove(TokenKey)
}

